package engine.systems.spatial.spatialOffset
{
	import ash.core.Component;
	
	import flash.utils.Dictionary;

	public class SpatialOffset extends Component
	{
		internal var _data:Dictionary = new Dictionary();
		
		internal var _x:Number;
		internal var _y:Number;
		internal var _rotation:Number;
		internal var _scaleX:Number;
		internal var _scaleY:Number;
		
		public function SpatialOffset() { }
		
		override public function destroy():void
		{
			this._data = null;
		}
		
		public function get x():Number 			{ return this._x; }
		public function get y():Number 			{ return this._y; }
		public function get rotation():Number 	{ return this._rotation; }
		public function get scaleX():Number 	{ return this._scaleX; }
		public function get scaleY():Number 	{ return this._scaleY; }
		
		public function add(name:String, data:SpatialOffsetData):void
		{
			this._data[name] = data;
		}
		
		public function get(name:String):SpatialOffsetData
		{
			return this._data[name];
		}
		
		public function remove(name:String):void
		{
			delete this._data[name];
		}
	}
}